home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-13 / amac44a.zip / COM002.QM < prev    next >
Text File  |  1992-05-27  |  8KB  |  145 lines

  1. *                               com002.qm
  2. *                    Macros to Make Macro Title Boxes
  3. *                        Written By Tom Hogshead
  4. *                       [ See COMTxx.QM For Use ]
  5. *                                 5/26/92
  6. *  Key    Subfile              Description
  7. * =====  =========  =====================================================
  8. *  @5               Make Macro Title Box  ( )                             |chg
  9. *  @6               Copy Macro Title To Index                             |chg
  10. *  @9               Remove Macro Title Box
  11. *
  12. *    {e:\up\COMT*}  Return To COMTxx.QM
  13. *
  14. *-- eoi
  15.  
  16. *                            M A C R O S
  17. * ----------------------------------------------------------------------
  18. * @(5) Make Macro Title Box
  19. *      (Like this, multi-lines OK)
  20. * ----------------------------------------------------------------------
  21. * Type macro title with *no* star in col 1.  Either mark title as a
  22. * block, or press @5, cursor down to end of title, and press <enter>.
  23. * Title need not have blank lines on top or bottom before macro
  24. * execution.  See JMPPOSxx.QM for discussion and use of position
  25. * markers.
  26.  
  27. @5      macrobegin
  28. * ---------------------- Mark Box If Not Marked ----------------------*
  29.         gotoblockend                * Test if block is closed
  30.         jtrue OK                    * If closed, go to OK
  31.         markline                    * If not closed, close temporarily
  32.                                     *  or start mark
  33.         gotoblockend                * Move to end of block if closed or stay
  34.                                     *  where we are if block not yet closed
  35.         jtrue OK                    * If block is now closed, we started with
  36.                                     *  an open block
  37.         makectrofscreen             * Center for viewing
  38.         Pause                       * Pause to mark end of block
  39.         setscreenoff                * Remove if not v2.15
  40.         markline                    * Mark end of block
  41.  OK:
  42. * -------------------------- Shift Title   --------------------------*
  43.         begline
  44.         shiftright shiftright       * Shift all lines to right twice
  45.         addline                     * Add line under title
  46.         gotoblockbeg                * Move to 1st char of first line
  47.         insertline                  * Insert line on top of title
  48.         cursordown                  * Move back to top of title
  49.         markcolumn                  * Mark 1st character column
  50.         endpara                     * Move to end of title
  51.         begline                     * Move to begin of last line
  52.         fillblock '*' return        * Fill 1st column with '*'
  53. * ------------------------- Make Box Bottom -------------------------*
  54.         cursordown                  * Move one line under title
  55.         begline "*"                 * Insert * at begin of bottom line
  56.         cursorright                 * Space right
  57.         unmarkblock dropanchor      * Start block
  58.         gotocolumn "72" return      * Finish block for dashes
  59.         fillblock "-" return        * Fill block with dashes
  60.         unmarkblock markcolumn begline * Mark bottom line
  61.         copy                        * Copy to scrap
  62. * --------------------------- Make Box Top ---------------------------*
  63.         prevpara                    * Move to begin of title
  64.         cursorup
  65.         paste                       * paste bottom line to top line
  66. * --------------- Insert Position Marker On Top of Box ---------------*
  67.         insertline begline          * Insert a blank line
  68.         "*" CursorRight #031 #030   * Insert position marker
  69.         cursordown cursordown       * Cursor down to first line of title
  70.         endline                     * Move to end of title for more edit
  71.         makectrofscreen                                                    *|
  72.         unmarkblock
  73. *
  74. * 48 bytes Fri  03-29-1991  15:13:26
  75. * 61 bytes Thu  05-02-1991  12:24:22 OK for multi-line titles
  76. * 67 bytes Tue  05-28-1991  21:06:20 (TH select title, add position marker)
  77. * 68 bytes Mon  06-03-1991  22:48:52 (TH added BegLine after block marked)
  78. * 69 bytes Tue  06-04-1991  08:48:51 (TH)
  79. * 72 bytes Wed  12-11-1991  16:38:14 (TH @5, for all qconfig's)
  80. * 73 bytes Wed  04-22-1992  17:49:37 (TH @5, for v2.15)
  81. * 69 bytes Mon  05-04-1992  13:04:55 (TH @5, changed ending position *|)
  82.  
  83. * 
  84. * ----------------------------------------------------------------------
  85. * @(6) Copy Macro Title To Index
  86. * ----------------------------------------------------------------------
  87. * Place cursor anywhere in macro title box not on top or bottom line.
  88. * Press @6 to copy title to last line of index on top.  Index must have
  89. * at least one blank line at end.  Title must not contain "--".
  90.  
  91. * At the pause, press <enter> to return to starting point.
  92.  
  93. @6      macrobegin
  94.         setscreenoff                * Remove if not v2.15
  95.         unmarkblock
  96.         find "--" return "b" return * Move cursor to top line
  97.         cursordown                  * Move down one line
  98.         markline                    * Mark top of title
  99.         find "--" return  return    * Move cursor to bottom line
  100.         cursorup                    * Move to bottom of title
  101.         markline                    * Finish marking title
  102.         copy                        * Copy title to scrap
  103.         begfile endpara             * Go to last line of index
  104.         cursordown                  * Move to end of index
  105.         begline
  106.         paste                       * Paste title to bottom of index
  107.         cursorright cursorright     * Move to title in index to edit
  108.         setscreenon                                                        *|
  109.         pause                       * Press <enter> to return to start     *|
  110.         Find                                                               *|
  111.             paste return                                                   *|
  112.             delline return          * Return to start                      *|
  113. *
  114. * 16 bytes Sun  03-31-1991  21:01:48
  115. * 34 bytes Wed  05-01-1991  02:51:46
  116. * 35 bytes Wed  04-22-1992  17:51:57 (TH @6, for v2.15)
  117. * 41 bytes Mon  05-04-1992  13:03:18 (TH @6, return to start *|)
  118.  
  119. * 
  120. * ----------------------------------------------------------------------
  121. * @(9) Remove Macro Title Box
  122. * ----------------------------------------------------------------------
  123. * Position cursor anywhere in title box and Press @9 to remove.  Title
  124. * box must have at least one blank line on top but need not have a
  125. * blank line beneath it.  Top and bottom line of box must be  * --- >
  126.  
  127. @9      macrobegin
  128.         setscreenoff                                * Remove if not v2.15  *|
  129.         cursordown unmarkblock markline prevpara    * Move to begin of box
  130.         find "--" return "l" return jfalse END      * Check if already boxed
  131.         delline                                     * Delete box top
  132.         cursorup begline                                                   *|
  133.         find #31 return "l" return jfalse NEXT      * Test if jmppos mrkr  *|
  134.         delline                                     * Delete line if mrkr  *|
  135.     NEXT:
  136.         Find "--" Return DelLine Return JFalse END  * Find box bottom
  137.         delline                                     * Delete box bottom
  138.         prevpara                                    * Move to first line
  139.     END:
  140.         scrolldown                                  * Re-position screen
  141.         unmarkblock
  142. *
  143. * 36 bytes Sun  05-05-1991  22:13:00 (TH @9)
  144. * 50 bytes Wed  04-22-1992  17:49:57 (TH @9, for v2.15 and jmppos marker)
  145.